package get.data;

import android.widget.ImageView;
import drag.and.drop.DrawView;

public class myNode {
	
	private String add;
	private String id;
	private int temp;
	private int light;
	private String tempURL;
	private String lightURL;
	private boolean status; // on/off
	private int coordx, coordy; 
	private ImageView draw;

	
	myNode(String add, String id, int temp, int light, boolean status, int coordx, int coordy){
		
		this.add=add;
		this.id = id;
		this.temp = temp;
		this.light = light;
		this.status=status;
		this.coordx = coordx;
		this.coordy = coordy;
		
	}
	myNode(String add){
		
		this.add=add;
		this.tempURL = null;
		this.lightURL = null;

		
	}
	
	myNode(String add, String id, boolean status){
		
		this.add=add;
		this.id = id;
		this.temp = 0;
		this.light = 0;
		this.status=status;
		this.coordx = 0;
		this.coordy = 0;
		
	}
	
	public void ChangeStatus(){
		

	}
	
	public void SetId(String id){
		this.id = id;
	}
	
	public void SetDraw(ImageView draw){
		this.draw = draw;
	}
	
	public void SetPosition(int coordx, int coordy){
		this.coordx = coordx;
		this.coordy = coordy;
	}
	
	public int GetX(){
		return coordx;
	}
	public int GetY(){
		return coordy;
	}
	
	public ImageView GetDraw(){
		return draw;
	}
	
	
	public void SetTemp(int temp){
		this.temp = temp;
	}
	
	public void SetTempURL(String temp){
		this.tempURL = temp;
	}
	
	public void SetLightURL(String light){
		this.lightURL = light;
	}
	
	public void SetStatus(String status){
		if(status.trim().compareTo("on")==0)
			this.status = true;
		else 
			this.status = false;
	}
	
	public void SetLight(int light){
		this.light = light;
	}
	
	public String GetAdd(){
		return add;
	}
	
	public String GetId(){
		return id;
	}
	
	public String GetTemp(){
		return tempURL;
	}
	
	public String GetLight(){
		return lightURL;
	}
	
	public boolean GetStatus(){
		return status;
	}
	

	
	public String toString(){
		
		return add+" "+tempURL +" "+lightURL+"\n";
	}
	
}
